#if !defined(ximera_physics_ishape_hpp)
#define ximera_physics_ishape_hpp

// -----------------------------------------------------------

#include <ximera/enum.hpp>
#include <ximera/common/factory.hpp>
#include <ximera/math/plane.hpp>

namespace ximera { namespace physics
{
    XIMERA_ENUM(ShapeType)
        Sphere,
        Box,
        Plane,
        Mesh
    XIMERA_ENUM_END(ShapeType)

    class XIMERA_API IShape
    {
    public:
		virtual ~IShape();

        virtual ShapeType type() const = 0;
    };

    class XIMERA_API ISphere : public IShape
    {
    public:
        static ShapeType::type const shapeType = ShapeType::Sphere;

    public:
        virtual ShapeType type() const { return shapeType; }

        virtual Real radius() const = 0;
        virtual void radius(Real value) = 0;
    };

    class XIMERA_API IBox : public IShape
    {
    public:
        static ShapeType::type const shapeType = ShapeType::Box;

    public:
        virtual ShapeType type() const { return shapeType; }

        virtual math::Vector3 extents() const = 0;
        virtual void extents(math::Vector3 const& value) = 0;
    };

    class XIMERA_API IPlane : public IShape
    {
    public:
        static ShapeType::type const shapeType = ShapeType::Plane;

    public:
        virtual ShapeType type() const { return shapeType; }

        virtual math::Plane plane() const = 0;
        virtual void plane(math::Plane const& value) = 0;
    };

    class XIMERA_API IMesh : public IShape
    {
    public:
        static ShapeType::type const shapeType = ShapeType::Mesh;

    public:
        virtual ShapeType type() const { return shapeType; }
    };

    class XIMERA_API ShapeFactory : public Factory<IShape, ShapeType>
    {
    public:
        // TODO: add creation from shape-description
    };
}}

// -----------------------------------------------------------

#endif
